package com.ghpt.service.impl;

import com.ghpt.mapper.YaSuoShiMapper;
import com.ghpt.pojo.YaSuoShi;
import com.ghpt.service.YaSuoShiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class YaSuoShiServiceImpl implements YaSuoShiService {
    @Autowired
    private YaSuoShiMapper yaSuoShiMapper;

    @Override
    public YaSuoShi findYaSuoShiById(Long id) {
        if (id != null) {
            return yaSuoShiMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(YaSuoShi yaSuoShi) {
        return yaSuoShiMapper.updateById(yaSuoShi);//更新成功为1否则为0
    }
}
